<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo CON_PLATFORMNAME;?>后台管理系统</title>
<meta name="keywords" content="" />
<meta name="description" content="" />

<link rel="stylesheet" href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/supersized.css">
<link rel="stylesheet" href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/login.css">
<link rel="stylesheet" href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/bootstrap.min.css">

<script src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/html5.js"></script>
<script src="<?php echo CON_STATIC_URL; ?>zhsjr/js/jquery.min.js"></script>
<script src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/supersized.3.2.7.min.js"></script>
<script src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/supersized-init.js"></script>

</head>
<body>


<div class="page-container">
	<div class="main_box">
		<div class="login_box">
			<div class="login_logo">
				<img src="/static/zhsjr/admin/logo.png" >
			</div>
			<p id="msg" style="text-align:center;color:red">&nbsp;</p>
			<div class="login_form">
				<form action="index.html" id="login_form" method="post">
				<input type="hidden" id="last_url" name="last_url" value="<?php echo $last_url;?>"/>
					<div class="form-group">
						<label for="j_username" class="t">用户名：</label> 
						<input id="username" value="" name="username" type="text" class="form-control x319 in" 
						autocomplete="off">
					</div>
					<div class="form-group">
						<label for="j_password" class="t">密　码：</label> 
						<input id="password" value="" name="password" type="password" 
						class="password form-control x319 in">
					</div>
					<div class="form-group">
						<label for="j_captcha" class="t">验证码：</label>
						 <input id="captcha" name="captcha" type="text" class="form-control x164 in">

						<img src="/yanzheng/index/" id="imgCode" onclick="changeImage();" alt="点击更换" title="点击更换"/>
					</div>
					
					<div class="form-group space">
						<label class="t"></label>　　　
						<button type="button"  id="submit_btn" 
						class="btn btn-primary btn-lg" onclick="login_submit()">&nbsp;登&nbsp;录&nbsp </button>
						<input type="reset" value="&nbsp;重&nbsp;置&nbsp;" class="btn btn-default btn-lg">
					</div>
				</form>
			</div>
		</div>
		<div class="bottom">Copyright © 2015 <?php echo COMPANY_NAME;?> All Rights Reserved. </div>
	</div>
</div>


<script type="text/javascript">
function login_submit(){
	$.ajax({
			type: "POST",
			url: "/sys_admin/login.html",
			data: "act=login&username="+$('#username').val()+"&password="+$('#password').val()+"&captcha="+$('#captcha').val()+"&last_url="+$('#last_url').val(),
			success: function(ret){
				if(ret.msg != ""){
					$("#msg").html(ret.msg);
					changeImage();
					setTimeout(function(){
						$("#msg").html("&nbsp;");
					},3000);
				}else{
					window.location=ret.url;
				}
			},
			dataType: "json"
		});
}

function changeImage() {
	document.getElementById("imgCode").src = "/yanzheng/index/?" + Math.random();
}

$("input").keyup(function(e){
if(e.keyCode==13){
   login_submit();
}
}); 

</script>
</body>
</html>
